home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-04-25 | 2.0 KB | 48 lines | [04] ASCII Text (0x0000) |
- Apple II
- Technical Notes
- _____________________________________________________________________________
- Developer Technical Support
-
- Apple IIgs
- #83: Resource Manager Stuff
-
- Written by: Dave Lyons May 1990
-
- This Technical Note discusses how to open a shell application's resource fork
- and clarifies the meaning of NIL in resource maps.
- _____________________________________________________________________________
-
- Calling StartUpTools From a Shell Application (File Type $B5, EXE)
-
- StartUpTools tries to open the current application's resource fork. It
- determines the pathname of the "current application" by examining prefix 9:
- and making a GET_NAME GS/OS call, but do not assume it will always construct
- the pathname this way. If you call StartUpTools from a shell application and
- expect it to open your EXE file's resource fork, you will be disappointed.
-
- If GS/OS has launched your application, life is good--usually, though, a shell
- has loaded your shell application directly, so GET_NAME returns the name of
- the shell instead of the name of your application file.
-
- To open your shell file's resource fork, call ResourceStartUp, get the
- pathname by calling LGetPathname2 on your user ID, and pass the pathname to
- OpenResourceFile.
-
-
- What's NIL in a Resource Map?
-
- The resource maps for open resource files are kept in memory, and the
- structure is defined in chapter 45 of Apple IIgs Toolbox Reference, Volume 3.
-
- The resHandle field of a resource reference record (ResRefRec) is defined as
- "Handle of resource in memory. A NIL value indicates that the resource has
- not been loaded into memory." In this case, NIL means that the middle two
- bytes of the four-byte field are zero. In other words, a NIL entry in the
- resource map may have a non-zero value in the low-order byte.
-
-
- Further Reference
- _____________________________________________________________________________
- o Apple IIgs Toolbox Reference, Volume 3
-
-